package com.xtpt.disaster.common;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;

/**
 * @author jack_xin
 * @ClassName RsyncConfig
 * @Desc TODO
 * @date 2022年04月07日 12:59
 * @Version TODO
 */
@Data
public class RsyncConfig {
    private  String toolName;

    private String option;

    private String deleteAfter;

    public static RsyncConfig createRsync() {
        RsyncConfig rsyncConfig = new RsyncConfig();
        rsyncConfig.setToolName("rsync");
        rsyncConfig.setDeleteAfter("--delete-after");
        rsyncConfig.setOption("-avh");
        return rsyncConfig;
    }
}
